<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="includeTop.jsp"%>
<p>&nbsp;</p>
<c:if test="${empty userSession.user}" >
<table align="center" width="540px" border="0"
	style="background-image:url(/lottery/images/regbg.jpg); background-repeat:no-repeat; width:540px; height:350px;">
</c:if>

<c:if test="${!empty userSession.user}" >
<table align="center" width="540px" border="0"
	style="background-image:url(/lottery/images/modify.jpg); background-repeat:no-repeat; width:540px; height:350px;">
</c:if>
	<tr>
		<td height="10px">
		
		</td>
	</tr>
	<tr>
		<td>
		<c:if test="${userForm.newUser}">
			<form action="<c:url value="/reg.do"/>" method="post" name="regForm" id="regForm" onSubmit="return checkRegForm()">
		</c:if>
		
		<c:if test="${!(userForm.newUser)}">
			<form action="<c:url value="/editUser.do"/>" method="post" name="editForm" id="editForm" onSubmit="return checkEditForm()">
		</c:if>
		<table width="100%" border="0">
			<tr>
				<td>
				</td>
				<td>
				<spring:bind path="userForm.*">
				  <c:forEach var="error" items="${status.errorMessages}">
				    <B><FONT color=RED>
				      <BR><c:out value="${error}"/>
				    </FONT></B>
				  </c:forEach>
				</spring:bind>
				</td>
			</tr>
			<tr>
				<td>
				<div align="right" class="font15"><spring:message code="filed.username"/>:</div>
				</td>
				<td>
				
				<c:if test="${userForm.newUser}">
					<spring:bind path="userForm.user.username">
						<input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>" id="username" class="input" title="请输入用户名"/> 
					</spring:bind>
				</c:if>
				<c:if test="${!userForm.newUser}">
						<SPAN class="input"> <c:out value="${userForm.user.username}"/></SPAN>
				</c:if>		
							
				</td>
			</tr>
			<tr>
				<td height="10px"></td>
			</tr>
			<tr>
				<td>
				<div align="right" class="font15"><spring:message code="filed.password"/>:</div>
				</td>
				<td>
				
				<spring:bind path="userForm.user.password">
						<input type="password" name="<c:out value="${status.expression}"/>" value="" id="password" class="input" title="请输入密码"/> 
				</spring:bind>
				
				</td>
			</tr>
			<tr>
				<td height="10px"></td>
			</tr>
			<tr>
				<td>
				<div align="right" class="font15"><spring:message code="filed.repwd"/>:</div>
				</td>
				<td>
				<spring:bind path="userForm.repeatedPassword">
						<input type="password" name="<c:out value="${status.expression}"/>" value="" id="repeatedPassword" class="input" title="请确认密码"/> 
				</spring:bind>
				
			</tr>
			<tr>
				<td height="10px"></td>
			</tr>
			<tr>
				<td>
				<div align="right" class="font15"><spring:message code="filed.email"/>:</div>
				</td>
				<td>
				<spring:bind path="userForm.user.email">
						<input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>" id="email" class="input" title="请输入邮箱"/> 
				</spring:bind>
			</tr>
			<tr>
				<td colspan="2">
				<c:if test="${empty userSession.user}" >
				<input style="MARGIN-LEFT:150px;MARGIN-TOP:20px;" type="image" src="/lottery/images/reg.gif" />
				</c:if>
				<c:if test="${!empty userSession.user}" >
				<input style="MARGIN-LEFT:150px;MARGIN-TOP:20px;" type="image" src="/lottery/images/submit.gif" />
				</c:if>
				</td>
			</tr>
		</table>
		
		</form>
		</td>
	</tr>
</table>

<%@ include file="includeButtom.jsp"%>